To use: find or place a number of AUDIO clips together in a row, highlight one of them and run this ARexx routine. Every AUDIO clip will be timed to start immediately after the one before finishes.
Note: This routine starts at the highlighted clip and stops at the first NON AUDIO clip. (e.g. effect, stop, still, video etc.)
*/
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT',0)
/* --- begin --- */
start_loc=croutonspot()
call croutonpick(LAST)
project_end=croutonsinproject()
current_spot=start_loc
isaudio=0
did_one=0
/* --- Read current audio clip --- */
call croutonpick(current_spot)
current_spot=current_spot+1
/* --- test for audio clip --- */
if croutontype()=" AUD" then isaudio=1
/* --- wait for any screen update delay --- */
call time('R')
do while (time('E')<0.5)
end
call req_open("Link - by Aussie","----------------","Links start times of SELECTED AUDIO clip to the"," following AUDIO clips. (Stops at first non-audio clip) ")
if isaudio=0 then do
call req_tell("Nope. The selected clip..."," must be an AUDIO ONLY crouton!")
call req_close()
call quit
end
test = req_tell("Ok to Link these audio clips"," so they follow each other?")
call req_close()
if test=0 then call quit
prevstart=croutongettag(Delay)
Last_Time_Mode= croutongettag(TimeMode) /* Locking to 2=prog time 1=inpoint 0=clip */
prevstart=prevstart+croutongettag(AudioDuration)
isaudio=1
current_temp=current_spot
/* --- loop starts --- */
do while isaudio=1
isaudio=0
/* --- set following audio clips start points --- */
call croutonpick(current_spot)
current_spot=current_spot+1
if croutontype()=" AUD" then isaudio=1
if isaudio=0 & did_one=0 then do
call req_tell("The following clip is NOT an audio crouton!")
call quit
end
if isaudio=0 then call quita
did_one=1
call croutonsettag(Delay,PrevStart)
call croutonsettag(TimeMode,Last_Time_Mode) /* Locking to 2=prog time 1=inpoint 0=clip */
/* --- Set up next link --- */
prevstart=croutongettag(Delay)
prevstart=prevstart+croutongettag(AudioDuration)
isaudio=1
current_temp=current_spot
if current_spot=project_end+1 then isaudio=0
end
/* --- Wrap Up --- */
quita:
call projectupdate()
call croutonpick(start_loc)
call req_error(" OZ: All Done <<< Link is perfect >>>",)
call remlib("PROJECT_REXX_PORT")
exit
quit:
call croutonpick(start_loc)
call req_error(" OZ: <<< Last Operation Canceled >>>")